<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Advertising extends Model
{
    use HasFactory;

    const TYPE = [
        0 => '首页广告',
        1 => '详情页广告',
    ];

    protected $table = 'advertisings';
    protected $primaryKey = 'id';
    public $timestamps = true;
    protected $guarded = [];

    public function adminUser()
    {
        return $this->belongsTo(AdminUser::class, 'admin_user_id', 'id');
    }
}
